.class public Lcn/a/a/a/c;
.super Ljava/io/InputStream;


# instance fields
.field private a:I

.field private b:Ljava/io/RandomAccessFile;


# direct methods
.method public constructor <init>(Ljava/lang/String;II)V
    .locals 3

    invoke-direct {p0}, Ljava/io/InputStream;-><init>()V

    new-instance v0, Ljava/io/RandomAccessFile;

    new-instance v1, Ljava/io/File;

    invoke-direct {v1, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    const-string v2, "r"

    invoke-direct {v0, v1, v2}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V

    iput-object v0, p0, Lcn/a/a/a/c;->b:Ljava/io/RandomAccessFile;

    iput p3, p0, Lcn/a/a/a/c;->a:I

    iget-object v0, p0, Lcn/a/a/a/c;->b:Ljava/io/RandomAccessFile;

    int-to-long v1, p2

    invoke-virtual {v0, v1, v2}, Ljava/io/RandomAccessFile;->seek(J)V

    return-void
.end method


# virtual methods
.method public available()I
    .locals 1

    iget v0, p0, Lcn/a/a/a/c;->a:I

    return v0
.end method

.method public close()V
    .locals 1

    invoke-super {p0}, Ljava/io/InputStream;->close()V

    iget-object v0, p0, Lcn/a/a/a/c;->b:Ljava/io/RandomAccessFile;

    invoke-virtual {v0}, Ljava/io/RandomAccessFile;->close()V

    return-void
.end method

.method public read()I
    .locals 2

    const/4 v0, -0x1

    iget v1, p0, Lcn/a/a/a/c;->a:I

    add-int/lit8 v1, v1, -0x1

    iput v1, p0, Lcn/a/a/a/c;->a:I

    if-ne v1, v0, :cond_0

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcn/a/a/a/c;->b:Ljava/io/RandomAccessFile;

    invoke-virtual {v0}, Ljava/io/RandomAccessFile;->read()I

    move-result v0

    goto :goto_0
.end method

.method public read([B)I
    .locals 3

    const/4 v2, 0x0

    iget v0, p0, Lcn/a/a/a/c;->a:I

    array-length v1, p1

    if-lt v0, v1, :cond_0

    iget-object v0, p0, Lcn/a/a/a/c;->b:Ljava/io/RandomAccessFile;

    invoke-virtual {v0, p1}, Ljava/io/RandomAccessFile;->read([B)I

    array-length v0, p1

    iget v1, p0, Lcn/a/a/a/c;->a:I

    sub-int/2addr v1, v0

    iput v1, p0, Lcn/a/a/a/c;->a:I

    :goto_0
    return v0

    :cond_0
    iget v0, p0, Lcn/a/a/a/c;->a:I

    if-lez v0, :cond_1

    iget-object v0, p0, Lcn/a/a/a/c;->b:Ljava/io/RandomAccessFile;

    iget v1, p0, Lcn/a/a/a/c;->a:I

    invoke-virtual {v0, p1, v2, v1}, Ljava/io/RandomAccessFile;->read([BII)I

    iget v0, p0, Lcn/a/a/a/c;->a:I

    iput v2, p0, Lcn/a/a/a/c;->a:I

    goto :goto_0

    :cond_1
    const/4 v0, -0x1

    goto :goto_0
.end method

.method public read([BII)I
    .locals 2

    iget v0, p0, Lcn/a/a/a/c;->a:I

    if-lt v0, p3, :cond_0

    iget-object v0, p0, Lcn/a/a/a/c;->b:Ljava/io/RandomAccessFile;

    invoke-virtual {v0, p1, p2, p3}, Ljava/io/RandomAccessFile;->read([BII)I

    iget v0, p0, Lcn/a/a/a/c;->a:I

    sub-int/2addr v0, p3

    iput v0, p0, Lcn/a/a/a/c;->a:I

    :goto_0
    return p3

    :cond_0
    iget v0, p0, Lcn/a/a/a/c;->a:I

    if-lez v0, :cond_1

    iget-object v0, p0, Lcn/a/a/a/c;->b:Ljava/io/RandomAccessFile;

    iget v1, p0, Lcn/a/a/a/c;->a:I

    invoke-virtual {v0, p1, p2, v1}, Ljava/io/RandomAccessFile;->read([BII)I

    iget p3, p0, Lcn/a/a/a/c;->a:I

    const/4 v0, 0x0

    iput v0, p0, Lcn/a/a/a/c;->a:I

    goto :goto_0

    :cond_1
    const/4 p3, -0x1

    goto :goto_0
.end method
